<!DOCTYPE HTML>
<html>
   <head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>知果汇</title>
		<link href="_CSS_/bootstrap.min.css" rel="stylesheet">
		<link href="_CSS_/simple-line-icons.css" rel="stylesheet">
		<link href="_CSS_/font-awesome.min.css" rel="stylesheet">
		<link href="_CSS_/jasny-bootstrap.min.css" rel="stylesheet">
		<link rel="stylesheet" href="_CSS_/nanoscroller.css">
		<link href="_CSS_/style.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="_CSS_/jquery-ui.css">
		<!--[if lt IE 9]>
		  <script src="js/html5shiv.min.js"></script>
		  <script src="js/respond.min.js"></script>
		<![endif]-->
		<style type="text/css">
		    body{background-color: #ffffff;}
		    .page-container{margin-bottom: 50px;}
			.row{margin-left: 0px;margin-right: 0px;min-width: 650px;}
			.radio-box{display:inline-block;width: 64px;}
			.formControls{padding-right:50px; position: relative;}
			.textarea {height: 100px;resize: none;font-size: 14px;padding: 4px;}
            .textarea-numberbar {position: absolute;right: 70px;bottom: 5px;z-index: 1;margin-bottom: 0;}
            /* label{margin-right: 15px;} */
            .formControls label{margin-right: 15px;}
            input[type=checkbox]{vertical-align: middle;margin-top: 0px;margin-right: 5px;} 
		</style>
    </head>
	<body>
	<article class="page-container">
		<form class="form form-horizontal" id="form-admin-add">
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-3"></label>
			<div class="formControls col-xs-9 col-sm-9">
				<p></p>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-3"></label>
			<div class="formControls col-xs-9 col-sm-9">
				<p></p>
			</div>
		</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-3"></label>
			<div class="formControls col-xs-9 col-sm-9">
				<p></p>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-3"></label>
			<div class="formControls col-xs-9 col-sm-9">
				<p></p>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-3"></label>
			<div class="formControls col-xs-9 col-sm-9">
				<p></p>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-3 col-sm-3"></label>
			<div class="formControls col-xs-9 col-sm-9">
				<p></p>
			</div>
		</div>
		</form>
	</article>
	
    <script src="_JS_/jquery.min.js"></script>
    <script src="_JS_/bootstrap.min.js"></script>
    <script src="_JS_/jasny-bootstrap.min.js"></script>
    <script src="_JS_/jquery.slimscroll.min.js"></script>
    <script src="_JS_/jquery.nanoscroller.min.js"></script>
    <script src="_JS_/metismenu.min.js"></script>
    <script src="_JS_/float-custom.js"></script>
    <script type="text/javascript" src="_JS_/layer/layer.js"></script>
    <script type="text/javascript" src="_JS_/jquery.validation/1.14.0/jquery.validate.min.js"></script> 
    <script type="text/javascript" src="_JS_/jquery.validation/1.14.0/validate-methods.js"></script> 
    <script type="text/javascript" src="_JS_/jquery.validation/1.14.0/messages_zh.min.js"></script> 

<script type="text/javascript">
	$(function () {
        var url = window.location.href;
        id = url.split("#")[1];
        type = url.split("#")[2];
        $.ajax({
            type: 'GET',
            url: "{:url('api/companys/companys_msg')}",
            dataType: 'jsonp',
            jsonp: 'callback',
            data: {id: id,'type':type},
            success: function (msg) {
                if (msg.code == 200) {
					if(type == 1){
						$(".form-label").eq(0).html("企业名称：");
						$(".form-label").eq(1).html("联系方式：");
						$(".form-label").eq(2).html("详细地址：");
						$(".form-label").eq(3).html("荣誉勋章：");
						$(".form-label").eq(4).html("企业介绍：");
						$(".formControls p").eq(0).html(msg.data.name);
						$(".formControls p").eq(1).html(msg.data.phone);
						$(".formControls p").eq(2).html(msg.data.address);
						if(msg.data.companys.length != 0){
							for(var i=0;i<msg.data.companys.length;i++){
								html = ''+msg.data.companys[i].years+':<span>'+msg.data.companys[i].honor+'-'+msg.data.companys[i].levels+'</span><br/>';
								$(".formControls p").eq(3).append(html);
							}
							
						}
						
						$(".formControls p").eq(4).html(msg.data.introduce);
						
					}else if(type == 2){
						$(".form-label").eq(0).html("机构名单：");
						$(".form-label").eq(1).html("星级：");
						$(".form-label").eq(2).html("详细地址：");
						$(".form-label").eq(3).html("机构介绍：");
						
						$(".formControls p").eq(0).html(msg.data.name);
						$(".formControls p").eq(1).html(msg.data.star+"星");
						$(".formControls p").eq(2).html(msg.data.address);
						$(".formControls p").eq(3).html(msg.data.introduce);
					}else if(type == 3){
						$(".form-label").eq(0).html("代理人：");
						$(".form-label").eq(1).html("机构名单：");
						$(".form-label").eq(2).html("星级：");
						$(".form-label").eq(3).html("资格证号：");
						$(".form-label").eq(4).html("电子邮箱：");
						$(".form-label").eq(5).html("专业：");
						
						$(".formControls p").eq(0).html(msg.data.username);
						$(".formControls p").eq(1).html(msg.data.name);
						$(".formControls p").eq(2).html(msg.data.star + "星");
						$(".formControls p").eq(3).html(msg.data.certificate);
						$(".formControls p").eq(4).html(msg.data.email);
						$(".formControls p").eq(5).html(msg.data.major);
					}
                   
                } else {
                    layer.msg('获取信息不成功!', {icon: 5, time: 2000});
                }
            }
        })
    })
</script> 
</body>
</html>